#export ADK=/path/to/Android/Sdk
#export NDK=/path/to/Android/Ndk

if [[ "$ADK" == "" || "$NDK" == "" ]]; then
    echo "ADK/NDK not set"
    return 1
fi

# Set this to your minSdkVersion.
if [[ "$API" == "" ]]; then
    export API=23
fi

if [[ "$ABI" == "" ]]; then
    export ABI=arm64-v8a
fi

# Only choose one of these, depending on your build machine...
#export TOOLCHAIN=$NDK/toolchains/llvm/prebuilt/darwin-x86_64
export TOOLCHAIN=$NDK/toolchains/llvm/prebuilt/linux-x86_64

# Only choose one of these, depending on your device...
export TARGET=aarch64-linux-android
#export TARGET=armv7a-linux-androideabi
#export TARGET=i686-linux-android
#export TARGET=x86_64-linux-android

# Build.make \
export CC=$TOOLCHAIN/bin/$TARGET$API-clang 
export CXX=$TOOLCHAIN/bin/$TARGET$API-clang++ 
export AR=$TOOLCHAIN/bin/llvm-ar 
export RANLIB=$TOOLCHAIN/bin/llvm-ranlib 
